package com.lantosec.hmrp.core.util.sms;

import java.util.HashMap;
import java.util.Map;

public class Config {
    public static String URL = "http://106.ihuyi.com/webservice/sms.php?method=Submit";
    public static String ACCOUNT = "cf_lantosec";
    public static String APIKEY = "3a3d54659e679ee6044e34e4a08a5894";

    private static Map<Integer, String> RESULT;

    static {
        RESULT = new HashMap<>();
        RESULT.put(0, "提交失败");
        RESULT.put(2, "提交成功");
        RESULT.put(400, "非法ip访问");
        RESULT.put(401, "帐号不能为空");
        RESULT.put(402, "密码不能为空");
        RESULT.put(403, "手机号码不能为空");
        RESULT.put(4030, "手机号码已被列入黑名单");
        RESULT.put(404, "短信内容不能为空");
        RESULT.put(405, "API ID或API KEY不正确");
        RESULT.put(4050, "账号被冻结");
        RESULT.put(40501, "动态密码已过期");
        RESULT.put(40502, "动态密码校验失败");
        RESULT.put(4051, "剩余条数不足");
        RESULT.put(4052, "访问ip与备案ip不符");
        RESULT.put(406, "手机号码格式不正确");
        RESULT.put(407, "短信内容含有敏感字符");
        RESULT.put(4070, "签名格式不正确");
        RESULT.put(4071, "没有提交备案模板");
        RESULT.put(4072, "提交的短信内容与审核通过的模板内容不匹配");
        RESULT.put(40722, "变量内容超过指定的长度【8】");
        RESULT.put(4073, "短信内容超出长度限制");
        RESULT.put(4074, "短信内容包含emoji符号");
        RESULT.put(4075, "签名未通过审核");
        RESULT.put(408, "发送超限（[20]条），已加入黑名单，可登入平台解除");
        RESULT.put(4080, "同一手机号码同一秒钟之内发送频率不能超过1条");
        RESULT.put(4082, "超出同一手机号一天之内【5】条短信限制");
        RESULT.put(4085, "同一手机号验证码短信发送超出【5】条");
    }

    public static String getMessage(int code) {
        return RESULT.get(code);
    }

    public static boolean isOk(int code) {
        return code == 2;
    }



}
